package com.neo.controller;

import com.github.wujun234.uid.UidGenerator;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class IdGenController {

    @Resource
    private UidGenerator cachedUidGenerator;

    @GetMapping("/idGen")
    public Long idGen(){
        return cachedUidGenerator.getUID();
    }
}
